using Terra.Core.Common.ErrorCodes.Constants;

namespace Terra.Core.Common.Exceptions;

/// <summary>
/// 权限异常
/// </summary>
public class PermissionException : BaseException
{
    public PermissionException(string message = "权限不足")
        : base(message)
    {
        Code = SystemErrorCodes.Forbidden;
    }

    public PermissionException(string message, Exception innerException)
        : base(message, innerException)
    {
        Code = SystemErrorCodes.Forbidden;
    }

    public PermissionException(string message, string code)
        : base(message)
    {
        Code = code;
    }
}